Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 2 - Geometric Shapes / Geometric Shapes Reference
Functions / Creating Geometric Shapes


GXNewPoint

You can use the GXNewPoint function to create a new point shape and initialize its geometry.

gxShape GXNewPoint(const gxPoint *data);
data
A pointer to the initial point geometry.
function result
A reference to the new point shape.
DESCRIPTION
The GXNewPoint function creates a copy of the default point shape, sets the owner count of the copy to 1, initializes its geometry with the values in the data parameter, and returns a reference to it as the function result.

Although this function creates a copy of the default point shape, it does not create a copy of the default point's style, ink, or transform objects. The new point shape returned by this function contains references to the same style, ink, and transform as the default point shape.

SPECIAL CONSIDERATIONS
If no error occurs, the GXNewPoint function creates a shape; you are responsible for disposing of this shape when you no longer need it. See Inside Macintosh: QuickDraw GX Objects for information about creating and disposing of shapes.

If an error occurs, this function returns nil as the function result.

ERRORS, WARNINGS, AND NOTICES
Errors 
out_of_memory 
parameter_is_nil(debugging version)
SEE ALSO
For an example that uses this function, see "Creating and Drawing Points" beginning on page 2-29.

For a discussion of points and the default point shape, see "Point Shapes" on page 2-16.

For a description of the gxPoint structure, see page 2-104.

To create a new point shape without specifying an initial geometry, see the description of the GXNewShape function in the chapter "Shape Objects" in Inside Macintosh: QuickDraw GX Objects.

To set the geometry of an existing point shape, see the description of the GXSetPoint function on page 2-122.

To draw a point geometry, see the description of GXDrawPoint on page 2-158. To draw a point shape, see the description of GXDrawShape in the chapter "Shape Objects" in Inside Macintosh: QuickDraw GX Objects.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help